import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/tutorial/` + url, ...arg)

/**
 * 配课Api接口管理器
 *
 * @author ahui
 * @date  2023/05/26 19:06
 **/
export default {
	// 获取配课分页
	eduTutorialPage(data) {
		return request('page', data, 'get')
	},
	// 获取配课列表
	eduTutorialList(data) {
		return request('list', data, 'get')
	},
	// 提交配课表单 edit为true时为编辑，默认为新增
	eduTutorialSubmitForm(data, edit = false) {
		return request(edit ? 'add' : 'edit', data)
	},
	eduTutorialBatchEdit(data) {
		return request('batchEdit', data)
	},
	// 删除配课
	eduTutorialDelete(data) {
		return request('delete', data)
	},
	// 获取配课详情
	eduTutorialDetail(data) {
		return request('detail', data, 'get')
	},
	eduTeacherList(data) {
		return request('teacherList', data, 'get')
	},
	eduCourseList(data) {
		return request('courseList', data, 'get')
	},
	eduKlassList(data) {
		return request('klassList', data, 'get')
	},
	tutorialExport(data) {
		return request('export', data, 'get', {
			responseType: 'blob'
		})
	},
	splitClass(data) {
		return request('splitClass', data, 'get')
	}
}
